import {defineStore} from 'pinia'

export const useHomeStore = defineStore('home',{
    state:()=>{
        return {
            homeInfo:{},
            typelist:[]
        }
    },
    // 开启数据缓存,默认是存在sessionStorage
    persist: {
        enabled: true,
        strategies: [
            {
                key: 'homeInfo',//设置存储的key
                storage: localStorage,//表示存储在localStorage
            }
        ]
    },
})